<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
	<xsl:preserve-space elements="*" />
	<xsl:template match="/">

		<html>
			<body>
				<xsl:for-each select="log/run">
					<h4>
						Application started at: <xsl:value-of select="@AppStart"/><br/>
						Exe version: <xsl:value-of select="@ExeVersion"/><br/>
						Commandline: <xsl:value-of select="@CommandLine"/><br/>
						Computer name: <xsl:value-of select="@ComputerName"/><br/>
						User name: <xsl:value-of select="@UserName"/><br/>
						Debugger present: <xsl:value-of select="@DebuggerPresent"/>
					</h4>
					<font face="Verdana" size="small">
					<table border="0">
						<tr bgcolor="#201a46">
							<th><font color="#FFFFFF">Timestamp</font></th>
							<th><font color="#FFFFFF">Thread</font></th>
							<th><font color="#FFFFFF">Level</font></th>
							<th><font color="#FFFFFF">Keywords</font></th>
							<th><font color="#FFFFFF">Message</font></th>
						</tr>

						<xsl:for-each select="logentry">
							<xsl:choose>
								<xsl:when test="@level = 'INFO'">
									<tr bgcolor="#d4d06d">
										<td>
											<xsl:value-of select="@timestamp"/>
										</td>
										<td>
											<xsl:value-of select="@thread"/>
										</td>
										<td>
											<xsl:value-of select="@level"/>
										</td>
										<td>
											<xsl:value-of select="@keywords"/>
										</td>
										<td>
											<xsl:variable name="voidedline_count" select="count(*)" />
											<xsl:if test="$voidedline_count=0">
												<textarea readonly="true"  rows="8" cols="60">
													<xsl:value-of select="." />
												</textarea>
											</xsl:if>
											<xsl:if test="$voidedline_count!=0">
												<textarea readonly="true"  rows="8" cols="60">
													<xsl:copy-of select="*" />
												</textarea>
											</xsl:if>
										</td>
									</tr>
								</xsl:when>
								<xsl:when test="@level = 'DEBUG'">
									<tr bgcolor="#ffff00">
										<td>
											<xsl:value-of select="@timestamp"/>
										</td>
										<td>
											<xsl:value-of select="@thread"/>
										</td>
										<td>
											<xsl:value-of select="@level"/>
										</td>
										<td>
											<xsl:value-of select="@keywords"/>
										</td>
										<td>
											<xsl:variable name="voidedline_count" select="count(*)" />
											<xsl:if test="$voidedline_count=0">
												<textarea readonly="true"  rows="8" cols="60">
													<xsl:value-of select="." />
												</textarea>
											</xsl:if>
											<xsl:if test="$voidedline_count!=0">
												<textarea readonly="true"  rows="8" cols="60">
													<xsl:copy-of select="*" />
												</textarea>
											</xsl:if>
										</td>
									</tr>
								</xsl:when>
								<xsl:when test="@level = 'ERROR'">
									<tr bgcolor="#ff7777">
										<td>
											<xsl:value-of select="@timestamp"/>
										</td>
										<td>
											<xsl:value-of select="@thread"/>
										</td>
										<td>
											<xsl:value-of select="@level"/>
										</td>
										<td>
											<xsl:value-of select="@keywords"/>
										</td>
										<td>
											<xsl:variable name="voidedline_count" select="count(*)" />
											<xsl:if test="$voidedline_count=0">
												<textarea readonly="true"  rows="8" cols="60">
													<xsl:value-of select="." />
												</textarea>
											</xsl:if>
											<xsl:if test="$voidedline_count!=0">
												<textarea readonly="true"  rows="8" cols="60">
													<xsl:copy-of select="*" />
												</textarea>
											</xsl:if>
										</td>
									</tr>
								</xsl:when>
								<xsl:otherwise>
									<tr bgcolor="#d4d06d">
										<td>
											<xsl:value-of select="@timestamp"/>
										</td>
										<td>
											<xsl:value-of select="@thread"/>
										</td>
										<td>
											<xsl:value-of select="@level"/>
										</td>
										<td>
											<xsl:value-of select="@keywords"/>
										</td>
										<td>
											<xsl:variable name="voidedline_count" select="count(*)" />
											<xsl:if test="$voidedline_count=0">
												<textarea readonly="true"  rows="8" cols="60">
													<xsl:value-of select="." />
												</textarea>
											</xsl:if>
											<xsl:if test="$voidedline_count!=0">
												<textarea readonly="true"  rows="8" cols="60">
													<xsl:copy-of select="*" />
												</textarea>
											</xsl:if>
										</td>
									</tr>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
					</table>
					</font>
				</xsl:for-each>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>
